<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs">
<head>
<title>C 参考手册</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../common/favicon.ico">
<link rel="stylesheet" href="../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-css:7:15cea3ec788a65b5187d4018eed543bf */</style>

<script src="../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"c","wgTitle":"c","wgCurRevisionId":42982,"wgArticleId":914,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"zh","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgMonthNamesShort":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRelevantPageName":"c","wgUserVariant":"zh","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh","language":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-MathJax":1,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-js:7:258d7cd6aa9aa67dee25e01fb6a9e505 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">C 参考手册</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">来自cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><strong class="selflink"> C</strong><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="c/language.html" title="c/language">语言</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/header.html" title="c/header">头文件</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/types.html" title="c/types">类型支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/program.html" title="c/program">程序工具</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/variadic.html" title="c/variadic">变参数函数支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/memory.html" title="c/memory">动态内存管理</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/error.html" title="c/error">错误处理</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/chrono.html" title="c/chrono">日期和时间工具</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/string.html" title="c/string">字符串库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/algorithm.html" title="c/algorithm">算法</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/numeric.html" title="c/numeric">数值</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/io.html" title="c/io">输入/输出支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/locale.html" title="c/locale">本地化支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/thread.html" title="c/thread">线程支持</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/atomic.html" title="c/atomic">原子操作</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="c/experimental.html" title="c/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<table class="mainpagetable" cellspacing="0" style="width:100%; white-space:nowrap;">

<tr class="row rowtop">
<td colspan="3">
<p><span style="font-size: 0.8em;"><a href="c/language/history.html" title="c/language/history"> C89, C95, C99, C11, C17</a></span>
</p>
</td></tr>
<tr class="row">
<td>
<p><b><a href="c/language.html" title="c/language"> 语言</a></b>
</p>
<div class="mainpagediv">
<p><a href="c/language/basic_concepts.html" title="c/language/basic concepts"> 基本概念</a><br>
<a href="c/keyword.html" title="c/keyword"> C 关键字</a><br>
<a href="c/preprocessor.html" title="c/preprocessor"> 预处理器</a><br>
<a href="c/language/expressions.html" title="c/language/expressions"> 表达式</a><br>
<a href="c/language/declarations.html" title="c/language/declarations"> 声明</a><br>
<a href="c/language/initialization.html" title="c/language/initialization"> 初始化</a><br>
<a href="c/language/functions.html" title="c/language/functions"> 函数</a><br>
<a href="c/language/statements.html" title="c/language/statements"> 语句</a><br>
</p>
</div>
<p><b><a href="c/header.html" title="c/header"> 头文件</a></b>
</p>
</td>
<td>
<p><b><a href="c/types.html" title="c/types"> 类型支持</a></b>
</p><p><b><a href="c/program.html" title="c/program"> 程序工具</a></b>
</p><p><b><a href="c/variadic.html" title="c/variadic"> 变参数函数</a></b>
</p><p><b><a href="c/error.html" title="c/error"> 错误处理</a></b>
</p><p><b><a href="c/memory.html" title="c/memory"> 动态内存管理</a></b>
</p><p><b><a href="c/chrono.html" title="c/chrono"> 日期和时间工具</a></b>
</p><p><b><a href="c/string.html" title="c/string"> 字符串库</a></b>
</p>
<div class="mainpagediv">
<p>以空字符结尾的字符串：<br>
  <a href="c/string/byte.html" title="c/string/byte"> 字节</a>  −  <a href="c/string/multibyte.html" title="c/string/multibyte"> 多字节</a>  −  <a href="c/string/wide.html" title="c/string/wide"> 宽</a>
</p>
</div>
<p><b><a href="c/algorithm.html" title="c/algorithm"> 算法</a></b>
</p>
</td>
<td>
<p><b><a href="c/numeric.html" title="c/numeric"> 数值</a></b>
</p>
<div class="mainpagediv">
<p><a href="c/numeric/math.html" title="c/numeric/math"> 常用数学函数</a><br>
<a href="c/numeric/fenv.html" title="c/numeric/fenv"> 浮点环境</a> <span class="t-mark-rev t-since-c99">(C99)</span><br>
<a href="c/numeric/random.html" title="c/numeric/random"> 伪随机数生成</a><br>
<a href="c/numeric/complex.html" title="c/numeric/complex"> 复数算术</a> <span class="t-mark-rev t-since-c99">(C99)</span><br>
<a href="c/numeric/tgmath.html" title="c/numeric/tgmath"> 泛型数学</a> <span class="t-mark-rev t-since-c99">(C99)</span>
</p>
</div>
<p><b><a href="c/io.html" title="c/io"> 输入/输出支持</a></b>
</p><p><b><a href="c/locale.html" title="c/locale"> 本地化支持</a></b>
</p><p><b><a href="c/atomic.html" title="c/atomic"> 原子操作库</a></b> <span class="t-mark-rev t-since-c11">(C11)</span>
</p><p><b><a href="c/thread.html" title="c/thread"> 线程支持库</a></b> <span class="t-mark-rev t-since-c11">(C11)</span>
</p>
</td></tr>
<tr class="row">
<td colspan="3"><b><a href="c/experimental.html" title="c/experimental"> 技术规范</a></b>
<p>  <b><a href="c/experimental/dynamic.html" title="c/experimental/dynamic"> 动态内存扩展</a></b>  <span class="t-mark-rev t-since-dynamic-tr t-mark-ts">(动态内存 TR)</span><br>
  <b><a href="c/experimental/fpext1.html" title="c/experimental/fpext1"> 浮点扩展，部分 1</a></b>  <span class="t-mark-rev t-since-fpext1-ts t-mark-ts">(FP 扩展1 TS)</span><br>
  <b><a href="c/experimental/fpext4.html" title="c/experimental/fpext4"> 浮点扩展，部分 4</a></b>  <span class="t-mark-rev t-since-fpext4-ts t-mark-ts">(FP 扩展4 TS)</span><br>
</p>
</td></tr>
<tr class="row rowbottom">
<td colspan="3"> <a href="c/links.html" title="c/links">外部链接</a>  −  <a href="c/links/libs.html" title="c/links/libs">非 ANSI/ISO 库</a>  −  <a href="c/symbol_index.html" title="c/symbol index">索引</a>  −  <a href="c/symbol_index.html" title="c/symbol index">符号索引</a>
</td></tr></table>

<!-- 
NewPP limit report
Preprocessor visited node count: 384/1000000
Preprocessor generated node count: 1665/1000000
Post‐expand include size: 13839/2097152 bytes
Template argument size: 976/2097152 bytes
Highest expansion depth: 13/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_zh_:pcache:idhash:914-0!*!0!*!*!*!zh!* and timestamp 20200216161825 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    来自“<a href="https://zh.cppreference.com/mwiki/index.php?title=c&amp;oldid=42982">https://zh.cppreference.com/mwiki/index.php?title=c&amp;oldid=42982</a>”                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>导航</h5>
            <ul><li><a href="https://zh.cppreference.com/w/c">Online version</a></li><li>Offline version retrieved 2020-03-14 18:00.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> 本页面最后修改于2017年4月11日 (星期二) 07:44。</li>
                                    <li id="footer-info-viewcount">此页面已被浏览过85,272次。</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.MathJax","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.147 secs. -->
	</body>
<!-- Cached 20200216161826 -->
</html>